function editAdminDataDialog(position,caller,title,content,domName,callback,loadFileFinish,args,btn){
	if(btn != null){
		var buttons = btn;
	}else{
		var buttons = [
				{ title:"Cancel",style:"text-align:center", callback: function(thisdialog,args){
					thisdialog.dialog("close");
				}},
				{ title:"Save",style:"text-align:center", callback: function(thisdialog,args){
					thisdialog.dialog("close");
					if(callback!=null)callback(thisdialog,args);
				}}
			];
	}
	
	dynamicLoadingCursorDialog(position,caller,$("[name=dynamic]"),title,content,buttons,loadFileFinish,args);
}

function editAdminDataDialog2(caller,title,content,domName,callback,loadFileFinish,args,btn){
	if(btn != null){
		var buttons = btn;
	}else{
		var buttons = [
				{ title:"Cancel",style:"text-align:center", callback: function(thisdialog,args){
					thisdialog.dialog("close");
				}},
				{ title:"Save",style:"text-align:center", callback: function(thisdialog,args){
					thisdialog.dialog("close");
					if(callback!=null)callback(thisdialog,args);
				}}
			];
	}
	dynamicLoadingNonCursorDialog(caller,$("[name=dynamic]"),title,content,buttons,loadFileFinish,args);
}

function setPositionDialog(dialog){
	var d = dialog.parents(".ui-dialog:first");
	var w = d.width();
	var windowheight = d.parent().parent().height();
	var l = d.parent().parent().width();
	d.css("width",800);
	d.css("left",l*20/100);
	d.css("top",(windowheight-w)/5);
}